package com.marvels.dubbo.externalservice.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.fintech.third.model.sms.SmsTemplateNew;
import com.marvels.dubbo.externalservice.dto.SendMsgDTO;
import com.marvels.dubbo.externalservice.service.SendSmsNewService;

@RestController
@RequestMapping("dubbo/external/sendsms/api")
public class SmsNewController {
	@Autowired
	private SendSmsNewService sendSmsNewService;

	@RequestMapping("sendMsg")
	@ResponseBody
	public boolean sendMsg(@RequestBody SendMsgDTO sendMsgDTO) {
		return sendSmsNewService.sendMsg(sendMsgDTO);
	}
	
	@RequestMapping("getSmsTemplateNew")
	@ResponseBody
	public SmsTemplateNew getSmsTemplateNew(@RequestBody SendMsgDTO sendMsgDTO) {
		return sendSmsNewService.getSmsTemplateNew(sendMsgDTO);
	}
}
